package com.ddd.mill.api.producttype;


import com.ddd.mill.query.producttype.ProductTypeQueryService;
import com.ddd.mill.api.product.dto.response.ProductTypeListDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "商品管理")
@Slf4j
@RestController
public class productTypeController {

    @Autowired
    ProductTypeQueryService productTypeQueryService;

    @ApiOperation("产品类型列表")
    @GetMapping("type/list")
    public List<ProductTypeListDto> productTypeList(){
        return productTypeQueryService.productTypeList();
    }
}
